package com.ct.service.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.ct.entity.po.Approval;

//这里就是你想要调取其他service里面的方法的声明，然后使用在具体的impl里面，然后@RequestBody是要的
//下面name是你要用的service，然后travel-service-approval-client是文件名字加approval-client(你想要调用的client)
@FeignClient(name = "approval-service", contextId = "travel-service-approval-client")
public interface ApprovalClient {
    @RequestMapping(value = "/approval/getApprovalByTravelId", method = RequestMethod.POST)
    Approval getApprovalByTravelId(@RequestBody String travelId);

    @RequestMapping(value = "/approval/updateApprovalByTravelId", method = RequestMethod.POST)
    Integer updateApprovalByTravelId(@RequestBody String travelId);
}
